alter table jms_dm.dm_tab_center_weight_rate_net_summary_dt
    set tblproperties ('external.table.purge' = 'true');
drop table jms_dm.dm_tab_center_weight_rate_net_summary_dt;
CREATE EXTERNAL TABLE if not exists jms_dm.dm_tab_center_weight_rate_net_summary_dt
(
    site_code         string comment '中心到件扫描的网点code',
    site_name         string comment '中心到件扫描的网点名称',
    proxy_area_code   string comment '代理区',
    proxy_area_name   string comment '代理区',
    should_weigh_qty1 int comment '单件应称重票数',
    no_weigh_qty1     int comment '单件未称重票数',
    qty1_rate         decimal(16,2) comment '单件称重率',
    should_weigh_qty2 int comment '包件应称重包数',
    no_weigh_qty2     int comment '包件应称重包数',
    qty2_rate         decimal(16,2) comment '包件应称重包数',
    less_three_qty    int comment '不足3kg包数',
    weigh_rate        decimal(16,2) comment '不足3kg包数',
    date_time         string comment '日期'
)
    COMMENT '中心出港称重率报表明细'
    PARTITIONED BY ( dt STRING COMMENT '扫描时间')
    STORED AS PARQUET
    LOCATION '/dw/hive/jms_dm.db/external/dm_tab_center_weight_rate_net_summary_dt'
;

